
#include "pstyledbuttonplugin.h"
#include "pstyledbutton.h"
//#include "qmake_image_collection.cpp"

PStyledButtonPlugin::PStyledButtonPlugin(QObject *parent)
: QObject(parent)
{
   initialized = false;
}

void PStyledButtonPlugin::initialize(QDesignerFormEditorInterface * /* core */)
{
    if (initialized)
        return;

    initialized = true;
}

bool PStyledButtonPlugin::isInitialized() const
{
    return initialized;
}

QWidget *PStyledButtonPlugin::createWidget(QWidget *parent)
{
  return new PStyledButton(parent);
}

QString PStyledButtonPlugin::name() const
{
    return "PStyledButton";
}

QString PStyledButtonPlugin::group() const
{
    return "Pripares";
}

QIcon PStyledButtonPlugin::icon() const
{
    return QIcon(":/rsc/pripares.png");
}

QString PStyledButtonPlugin::toolTip() const
{
    return "A Styled button widget";
}

QString PStyledButtonPlugin::whatsThis() const
{
    return "";
}

bool PStyledButtonPlugin::isContainer() const
{
    return false;
}

QString PStyledButtonPlugin::domXml() const
{
    return "<widget class=\"PStyledButton\" name=\"styledButton\">\n"
           " <property name=\"geometry\">\n"
           "  <rect>\n"
           "   <x>0</x>\n"
           "   <y>0</y>\n"
           "   <width>75</width>\n"
           "   <height>25</height>\n"
           "  </rect>\n"
           " </property>\n"
           " <property name=\"toolTip\" >\n"
           "  <string>A Styled Button</string>\n"
           " </property>\n"
           " <property name=\"whatsThis\" >\n"
           "  <string>A custom user styled button.</string>\n"
           " </property>\n"
           " <property name=\"states\" >\n"
           "  <number>1</number>"
           " </property>\n"
           "</widget>\n";
}

QString PStyledButtonPlugin::includeFile() const
{
    return "pstyledbutton.h";
}

QString PStyledButtonPlugin::codeTemplate() const
{
    return "";
}

Q_EXPORT_PLUGIN(PStyledButtonPlugin)
//Q_EXPORT_PLUGIN2(PStyledButton, PStyledButtonPlugin)
